<template>
  <div class="ground-glass">
    <div class="wrap">
      <h2>磨砂玻璃效果</h2>
      <div class="modal"></div>
    </div>
  </div>
</template>

<script setup></script>

<style lang="scss">
.ground-glass {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  /* .wrap 渐变背景 */
  .wrap {
    width: 100%;
    height: 100%;;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

  /* h2 白色字体居中 */
  .wrap h2 {
    color: white;
    font-size: 2.5rem;
    text-align: center;
  }

  /* .modal 磨砂玻璃效果 */
  .modal {
    width: 300px;
    height: 200px;
    /* 半透明背景 */
    background-color: rgba(255, 255, 255, 0.1);
    /* 磨砂玻璃模糊效果 */
    backdrop-filter: blur(2px);
    /* 圆角 */
    border-radius: 15px;
    /* 半透明边框 */
    border: 1px solid rgba(255, 255, 255, 0.2);

    /* 阴影 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
</style>
